package com.hthy.futures.ui.fragment;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;

import com.hthy.futures.R;
import com.hthy.futures.base.BaseFragment;
import com.vilyever.socketclient.SocketClient;
import com.wordplat.ikvstockchart.entry.EntrySet;

import butterknife.Bind;

/**
   * 
   * Author:  Mr.bingley
   * Version: 
   * Date:  2017/4/28
   */

public class KWithTabFragment extends BaseFragment{
    @Bind(R.id.view_tab_layout)
    TabLayout mViewTabLayout;
    @Bind(R.id.view_pager)
    ViewPager mViewPager;

    private String[] mKTitles;
    private String mSsProductCode;
    private SocketClient mSocketClinet;
    private EntrySet mEntrySet;
    private KLineTestFragment mKlinfrg1 = new KLineTestFragment();;
    private KLineTestFragment mKlinfrg2;

    @Override
    protected int getLayoutId() {
        return R.layout.frg_k_tab;
    }

    @Override
    protected void initWidget(View root) {
        super.initWidget(root);
        mKTitles = getResources().getStringArray(R.array.array_k_title);

    }

    public void setPriceInfo(String ss_product_code, SocketClient socketClient) {
        this.mSsProductCode = ss_product_code;
        this.mSocketClinet= socketClient;

        mKlinfrg1.setPriceInfo(mSsProductCode,mSocketClinet);
    }

    public void setEntrySet(EntrySet entrySet) {
        this.mEntrySet = entrySet;
        if (mEntrySet != null) {
            mKlinfrg1.setEntrySet(mEntrySet);
        }
    }


}
